<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Person(name,age,gender){
            /* 属性 */
            this.name = name;
            this.age = age;
            this.gender = gender;
            /* 方法 */
            this.eat = function(){
                console.log("吃!!");
            }
        }
        const p1 = new Person("文渊",18,"男");
        const p2 = new Person("郑香",19,"女");

        console.log(p1.eat === p2.eat);
    </script>
</body>
</html>